﻿using ApiDAL.Common;
using ApiModel;
using DataAccess.SqlClient;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ApiDAL
{
    public class Studentdal
    {
        public List<StudentModel> StudentLogin(string name, string pwd)
        {
            SqlQuery SQL = new SqlQuery();
            SQL.CommandText = "exec proc_StudentLogin "+name+","+pwd+" ";
            DataSet ds = SqlDataAccess.ExecDataset(SQL);
            List<StudentModel> all = DataReaderToObjectHelper.DataTableToList<StudentModel>(ds.Tables[0]);
            return all;

        }
    }
}
